package com.rzx.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.rzx.entity.User;
import com.rzx.service.UserService;

/**
 *   
 * @author: zhangxubin
 * @date: 2019年3月28日 下午1:37:30 
 * @Description
 */
@Api(tags="User manager")
@RestController
@RequestMapping(value="/user")

 public class UserController {
	
	@Autowired
	private UserService userService;
	
	/**   
	 * @author: zhangxubin   
	 * @date: 2019年3月28日 下午2:11:15 
	 * @Description add User
	 */
	@ApiResponses(value={@ApiResponse(code=200,message="add User success",response=Integer.class)})
	@PostMapping("saveUser")
	public Object saveUser(User user){
		return userService.addUser(user);
	}

}
